import json from '@rollup/plugin-json';
import typescript from '@rollup/plugin-typescript';

const format = process.env.BUILD_FORMAT || 'es';

export default {
    input: './src/index.ts',
    output: {
        format,
        file: `dist/index.${format}.js`,
        name: 'JSDispatch',
        exports: 'auto',
    },
    plugins: [typescript({
        // declaration: true,
        moduleResolution: 'node'
    }), json()],
};